package com.yonyou.cyxdms.basedata.service.entity.product;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yonyou.cyx.framework.bean.dto.base.BaseDTO;
import com.yonyou.cyx.function.utils.bean.BeanMapperUtil;
import com.yonyou.cyxdms.framework.bean.entity.base.DMSBasePO;

/**
 * <p>
 * 整车物料号价格维护
 * </p>
 *
 * @author renwd
 * @since 2019-07-22
 */
@TableName("tm_vs_product_price")
public class VsProductPricePO extends DMSBasePO<VsProductPricePO> {

    private static final long serialVersionUID = 1L;

    /**
     * 整车产品价格维护_ID
     */
    @TableId(value = "PRODUCT_PRICE_ID", type = IdType.AUTO)
    private Long productPriceId;


    /**
     * APP_ID
     */
    @TableField("APP_ID")
    private String appId;


    /**
     * 公司代码
     */
    @TableField("COMPANY_CODE")
    private String companyCode;
    /**
     * 所有者代码
     */
    @TableField("OWNER_CODE")
    private String ownerCode;

    /**
     * 所有者的父组织代码（用于二网使用）
     */
    @TableField("OWNER_PAR_CODE")
    private String ownerParCode;

    /**
     * 产品代码
     */
    @TableField("PRODUCT_ID")
    private Long productId;

    /**
     * 销售指导价
     */
    @TableField("DIRECTIVE_PRICE")
    private Double directivePrice;

    /**
     * 储备高限
     */
    @TableField("MAX_RESERVE")
    private Integer maxReserve;

    /**
     * 储备底限
     */
    @TableField("MIN_RESERVE")
    private Integer minReserve;

    /**
     * 销售底价
     */
    @TableField("SALES_BASE_PRICE")
    private Double salesBasePrice;

    /**
     * 整车加价率
     */
    @TableField("VEHICLE_MARKUP_RATE")
    private Double vehicleMarkupRate;

    /**
     * 经销商分类ID
     */
    @TableField("BASEDATA_ID")
    private Long basedataId;

    /**
     * 数据来源：OEM、店面； 1045 厂家维护的为厂家维护；下发后写入 OEM
     */
    @TableField("DATA_SOURCES")
    private Integer dataSources;

    public Long getProductPriceId() {
        return productPriceId;
    }

    public void setProductPriceId(Long productPriceId) {
        this.productPriceId = productPriceId;
    }

    public String getAppId() {
        return appId;
    }

    public void setAppId(String appId) {
        this.appId = appId;
    }

    public String getCompanyCode() {
        return companyCode;
    }

    public void setCompanyCode(String companyCode) {
        this.companyCode = companyCode;
    }

    public String getOwnerCode() {
        return ownerCode;
    }

    public void setOwnerCode(String ownerCode) {
        this.ownerCode = ownerCode;
    }

    public String getOwnerParCode() {
        return ownerParCode;
    }

    public void setOwnerParCode(String ownerParCode) {
        this.ownerParCode = ownerParCode;
    }

    public Long getProductId() {
        return productId;
    }

    public void setProductId(Long productId) {
        this.productId = productId;
    }

    public Double getDirectivePrice() {
        return directivePrice;
    }

    public void setDirectivePrice(Double directivePrice) {
        this.directivePrice = directivePrice;
    }

    public Integer getDataSources() {
        return dataSources;
    }

    public void setDataSources(Integer dataSources) {
        this.dataSources = dataSources;
    }

    public Integer getMaxReserve() {
        return maxReserve;
    }

    public void setMaxReserve(Integer maxReserve) {
        this.maxReserve = maxReserve;
    }

    public Integer getMinReserve() {
        return minReserve;
    }

    public void setMinReserve(Integer minReserve) {
        this.minReserve = minReserve;
    }


    public Double getSalesBasePrice() {
        return salesBasePrice;
    }

    public void setSalesBasePrice(Double salesBasePrice) {
        this.salesBasePrice = salesBasePrice;
    }

    public Double getVehicleMarkupRate() {
        return vehicleMarkupRate;
    }

    public void setVehicleMarkupRate(Double vehicleMarkupRate) {
        this.vehicleMarkupRate = vehicleMarkupRate;
    }

    public Long getBasedataId() {
        return basedataId;
    }

    public void setBasedataId(Long basedataId) {
        this.basedataId = basedataId;
    }

    @Override
    public String toString() {
        return "VsProductPricePO{" +
                "productPriceId=" + productPriceId +
                ", appId='" + appId + '\'' +
                ", companyCode='" + companyCode + '\'' +
                ", ownerCode='" + ownerCode + '\'' +
                ", ownerParCode='" + ownerParCode + '\'' +
                ", productId=" + productId +
                ", directivePrice=" + directivePrice +
                ", maxReserve=" + maxReserve +
                ", minReserve=" + minReserve +
                ", salesBasePrice=" + salesBasePrice +
                ", vehicleMarkupRate=" + vehicleMarkupRate +
                ", basedataId=" + basedataId +
                ", dataSources=" + dataSources +
                '}';
    }

    /**
     * 将PO 信息转化为DTO
     *
     * @param dto 需要进行转换的dto
     * @author renwd
     * @since 2018/7/22 0022
     */
    protected <T extends BaseDTO> void transDtoToPo(T dto) {
        BeanMapperUtil.copyProperties(this, dto, "productPriceId");
    }


}
